package etcd

import (
	"github.com/coreos/etcd/clientv3"
	"log"
	"time"
)

func EtcdMain() {
	var cli, err = clientv3.New(clientv3.Config{
		Endpoints:   []string{"http://10.18.0.57:2379", "http://10.18.0.58:2379", "http://10.18.0.59:2379"},
		DialTimeout: 5 * time.Second,
	})

	if err != nil {
		log.Println("connect to etcd failed, err:", err)
		return
	}
	defer cli.Close()
}
